/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package calculator;

/**
 *
 * @author Administrator
 */
public class Factorial {
    
    public static int factorial(int n) {
        int prod = 1;
        for (int i = 1; i <= n; i++)
            prod *= i;
        return prod;
    }
    
}
